package com.yipei.business.service.impl;

import java.util.List;
import com.yipei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yipei.business.mapper.MlManagementAccountMapper;
import com.yipei.business.domain.MlManagementAccount;
import com.yipei.business.service.IMlManagementAccountService;

/**
 * 管理账号Service业务层处理
 * 
 * @author yipei
 * @date 2024-12-23
 */
@Service
public class MlManagementAccountServiceImpl implements IMlManagementAccountService 
{
    @Autowired
    private MlManagementAccountMapper mlManagementAccountMapper;

    /**
     * 查询管理账号
     * 
     * @param id 管理账号主键
     * @return 管理账号
     */
    @Override
    public MlManagementAccount selectMlManagementAccountById(Long id)
    {
        return mlManagementAccountMapper.selectMlManagementAccountById(id);
    }

    /**
     * 查询管理账号列表
     * 
     * @param mlManagementAccount 管理账号
     * @return 管理账号
     */
    @Override
    public List<MlManagementAccount> selectMlManagementAccountList(MlManagementAccount mlManagementAccount)
    {
        return mlManagementAccountMapper.selectMlManagementAccountList(mlManagementAccount);
    }

    /**
     * 新增管理账号
     * 
     * @param mlManagementAccount 管理账号
     * @return 结果
     */
    @Override
    public int insertMlManagementAccount(MlManagementAccount mlManagementAccount)
    {
        mlManagementAccount.setCreateTime(DateUtils.getNowDate());
        return mlManagementAccountMapper.insertMlManagementAccount(mlManagementAccount);
    }

    /**
     * 修改管理账号
     * 
     * @param mlManagementAccount 管理账号
     * @return 结果
     */
    @Override
    public int updateMlManagementAccount(MlManagementAccount mlManagementAccount)
    {
        mlManagementAccount.setUpdateTime(DateUtils.getNowDate());
        return mlManagementAccountMapper.updateMlManagementAccount(mlManagementAccount);
    }

    /**
     * 批量删除管理账号
     * 
     * @param ids 需要删除的管理账号主键
     * @return 结果
     */
    @Override
    public int deleteMlManagementAccountByIds(Long[] ids)
    {
        return mlManagementAccountMapper.deleteMlManagementAccountByIds(ids);
    }

    /**
     * 删除管理账号信息
     * 
     * @param id 管理账号主键
     * @return 结果
     */
    @Override
    public int deleteMlManagementAccountById(Long id)
    {
        return mlManagementAccountMapper.deleteMlManagementAccountById(id);
    }
}
